<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js">/*
  Generated by kissy-xtemplate.*/
KISSY.add('editor/render-xtpl', function () {
    return function (scopes, S, undefined) {
        var buffer = &quot;&quot;,
            config = this.config,
            engine = this,
            utils = config.utils;
        var runBlockCommandUtil = utils[&quot;runBlockCommand&quot;],
            getExpressionUtil = utils[&quot;getExpression&quot;],
            getPropertyOrRunCommandUtil = utils[&quot;getPropertyOrRunCommand&quot;];
        buffer += '&lt;div class=&quot;';
        var id0 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;prefixCls&quot;, 0, 1, undefined, false);
        buffer += getExpressionUtil(id0, true);
        buffer += 'editor-tools&quot;\r\n     id=&quot;ks-editor-tools-';
        var id1 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;id&quot;, 0, 2, undefined, false);
        buffer += getExpressionUtil(id1, true);
        buffer += '&quot;&gt;\r\n\r\n&lt;/div&gt;\r\n\r\n&lt;!--\r\nhttp://johanbrook.com/browsers/native-momentum-scrolling-ios-5/\r\nios 不能放在 iframe 上！\r\n--&gt;\r\n\r\n&lt;div class=&quot;';
        var id2 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;prefixCls&quot;, 0, 11, undefined, false);
        buffer += getExpressionUtil(id2, true);
        buffer += 'editor-textarea-wrap&quot;\r\n\r\n';
        var config3 = {};
        var params4 = [];
        var id5 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;mobile&quot;, 0, 13, undefined, true);
        params4.push(id5);
        config3.params = params4;
        config3.fn = function (scopes) {
            var buffer = &quot;&quot;;
            buffer += '\r\nstyle=&quot;overflow:scroll;-webkit-overflow-scrolling:touch;&quot;\r\n';
            return buffer;
        };
        buffer += runBlockCommandUtil(engine, scopes, config3, &quot;if&quot;, 13);
        buffer += '\r\n\r\nid=&quot;ks-editor-textarea-wrap-';
        var id6 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;id&quot;, 0, 17, undefined, false);
        buffer += getExpressionUtil(id6, true);
        buffer += '&quot;\r\n&gt;\r\n\r\n&lt;textarea\r\n        id=&quot;ks-editor-textarea-';
        var id7 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;id&quot;, 0, 21, undefined, false);
        buffer += getExpressionUtil(id7, true);
        buffer += '&quot;\r\n        class=&quot;';
        var id8 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;prefixCls&quot;, 0, 22, undefined, false);
        buffer += getExpressionUtil(id8, true);
        buffer += 'editor-textarea&quot;\r\n\r\n';
        var config9 = {};
        var params10 = [];
        var id11 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;textareaAttrs&quot;, 0, 24, undefined, true);
        params10.push(id11);
        config9.params = params10;
        config9.fn = function (scopes) {
            var buffer = &quot;&quot;;
            buffer += '\r\n';
            var id12 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;xindex&quot;, 0, 25, undefined, false);
            buffer += getExpressionUtil(id12, true);
            buffer += '=&quot;';
            var id13 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;.&quot;, 0, 25, undefined, false);
            buffer += getExpressionUtil(id13, true);
            buffer += '&quot;\r\n';
            return buffer;
        };
        buffer += runBlockCommandUtil(engine, scopes, config9, &quot;each&quot;, 24);
        buffer += '\r\n\r\n';
        var config14 = {};
        var params15 = [];
        var id16 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;mode&quot;, 0, 28, undefined, true);
        params15.push(id16);
        config14.params = params15;
        config14.fn = function (scopes) {
            var buffer = &quot;&quot;;
            buffer += '\r\nstyle=&quot;display:none&quot;\r\n';
            return buffer;
        };
        buffer += runBlockCommandUtil(engine, scopes, config14, &quot;if&quot;, 28);
        buffer += '\r\n\r\n&gt;';
        var id17 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;data&quot;, 0, 32, undefined, false);
        buffer += getExpressionUtil(id17, true);
        buffer += '&lt;/textarea&gt;\r\n\r\n&lt;/div&gt;\r\n\r\n&lt;div class=&quot;';
        var id18 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;prefixCls&quot;, 0, 36, undefined, false);
        buffer += getExpressionUtil(id18, true);
        buffer += 'editor-status&quot;\r\n     id=&quot;ks-editor-status-';
        var id19 = getPropertyOrRunCommandUtil(engine, scopes, {}, &quot;id&quot;, 0, 37, undefined, false);
        buffer += getExpressionUtil(id19, true);
        buffer += '&quot;&gt;\r\n\r\n&lt;/div&gt;';
        return buffer;
    }
});</pre>
</body>
</html>
